﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Management;
using System.Text;

namespace WMI.NET.CIM
{
    /// <summary>
    /// The CIM_DeviceConnection association class represents two or more connected devices. 
    /// </summary>
    public class CIM_DeviceConnection : CIM_Dependency
    {
        private Nullable<UInt32> _NegotiatedDataWidth;
        private Nullable<UInt64> _NegotiatedSpeed;

        /// <summary>
        /// When several bus or connection-data widths are possible, this property defines the one in use between the devices. Data width is specified in bits. If data width is not negotiated, or if this information is not available or important to device management, the property should be set to 0 (zero).
        /// </summary>
        public Nullable<UInt32> NegotiatedDataWidth { get { return _NegotiatedDataWidth; } }

        /// <summary>
        /// When several bus or connection speeds are possible, this property defines the one being used between the devices. Speed is specified in bits-per-second. If connection or bus speeds are not negotiated, or if this information is not available or important to device management, the property should be set to 0 (zero).
        /// </summary>
        public Nullable<UInt64> NegotiatedSpeed { get { return _NegotiatedSpeed; } }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="mbo"></param>
        public CIM_DeviceConnection(ManagementBaseObject mbo)
            : base(mbo)
        {
            _NegotiatedDataWidth = mbo.GetUIntValue("NegotiatedDataWidth");
            _NegotiatedSpeed = mbo.GetUlongValue("NegotiatedSpeed");
        }


    }




}
